package com.future.bantang.adapter;

import android.content.Context;

import com.future.bantang.R;
import com.future.bantang.entity.SearchCategorySceneEntity;
import com.future.bantang.view.RoundPicText;

/**
 * Created by zzh on 2016/1/16.
 */
public class FragmentSearchInventoryGridAdapter extends AbsBaseAdapter<SearchCategorySceneEntity.DataEntity>{

    public FragmentSearchInventoryGridAdapter(Context context) {
        super(context, R.layout.fragment_search_inventory_list_item);
    }

    @Override
    public void bindDatas(ViewHolder viewHolder, SearchCategorySceneEntity.DataEntity data) {
        RoundPicText roundPicText = (RoundPicText) viewHolder.getView(R.id.roundpictext_fra_search_inventory_list_item);
        roundPicText.setIvPhoto(data.getIcon());
        roundPicText.setTvTitle(data.getName());
        roundPicText.setTvSubTitle(data.getEn_name());
        //将id作为tag保存到控件上，后面会用到
        roundPicText.setTag(data.getId());

    }
}
